class ImagesController < ApplicationController

  # POST  /images/create
  def create
    @image = Image.new(:grid_id => params[:grid_id])
    @image.file = params[:file]

    if @image.save
      render :text => {:url => @image.url}.to_json
    else
      render :text => @image.errors.to_json
    end

  end

end
